const baseModel = require('./baseModel');

const role = require('../constants/role')

module.exports = class extends baseModel {
    constructor(...args) {
        super(...args);
        this._pk = 'account_id';   // 设置主键字段
        this.table('account');     // 设置表名
        this._soft_del_field = 'deleted_at'
    }

    /**
     * 添加额外的schema数据
     * @returns {{createdAt: {default: (function(): number)}, updatedAt: {update: boolean, default: (function(): number)}}}
     */
    get schema() {
        return {
            created_at: {
                default: () => Date.now()
            },
            updated_at: {
                update: true,
                default: () => Date.now()
            }
        }
    }
};
